/**
* Created with CLion.
* User:Lenovo
* Date:2023-07-06
* Time:22:59
* Description:洛谷 P1138  第 K 小整数
*/

#include <stdio.h>
#include <stdlib.h>
#define maxN 10005

int arr[maxN];

int cmp(const void *e1, const void *e2)
{
    return *(int *)e1 - *(int *)e2;
}

int main()
{
    int n, k;
    scanf("%d %d", &n, &k);

    for (int i = 0; i < n; i++)
    {
        scanf("%d", arr + i);
    }

    qsort(arr, n, 4, cmp);
    int count = 1;
    int prev = 0;
    int cur = 1;
    while (cur < n)
    {
        if (arr[cur] == arr[prev])
        {
            cur++;
        }
        else
        {
            prev = cur;
            cur++;
            count++;
        }

        if (count == k)
        {
            printf("%d", arr[prev]);
            return 0;
        }
    }

    printf("NO RESULT");

    return 0;
}